package jdk7;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

/**
 * @author honway.liu
 * @date 2018/4/23 下午10:15
 * @email gm100861@gmail.com
 * @blog http://linuxsogood.org
 */
public class VarDemo {

    public static void main(String[] args) {
        int a = 100_100_100;
        System.out.println(a);

        Integer i = 100;
        Integer j = 100;
        System.out.println(i == j);

        Integer x = 200;
        Integer y = 200;
        System.out.println(x == y);

        int[] arr = {1, 2, 3, 4};

        String s = "hello";
        for (int k = 0; k < s.length(); k++) {
            System.out.println(s.charAt(k));
        }

        Set<String> set = new HashSet<>();
        set.add("abc");
        set.add("bcd");
        set.add("xyz");
        set.add("abc");
        System.out.println(set);

        List<String> strings = new ArrayList<>();
        strings.add("abc");
        strings.add("bcd");
        strings.add("xyz");
        strings.add("abc");

        strings.stream().collect(Collectors.toSet()).forEach(System.out::println);
    }
}
